package com.zm.zmgz.utils;

import java.util.List;
import java.util.Objects;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: cjw
 * @Date: 2020/06/02/9:44
 * @Description:list集合相关工具类
 */
public class ListUtils {


    /***
    * @Description: 判断字符串集合中是否存在该字符串
    * @Param:
    * @return:
    * @Author: cjw
    * @Date: 2020-06-02 09:45:14
    */
    public static  Boolean isExistStringFromList(String s, List<String> list){
        if(Objects.isNull(s) || Objects.isNull(list) || list.size() == 0)
            return false;
        for (String s1 : list) {
            if(s.equals(s1))
                return true;
        }
        return false;
    }

}
